package br.com.maps.contacts;

import java.util.List;

import android.widget.ImageView;

/**
 * Builder for contacts
 * 
 * @author Bruno Ortiz
 * 
 */
public class ContactsBuilder {

	private Contact contact;

	private ContactsBuilder() {
		this.contact = new Contact();
	}

	public static ContactsBuilder createAContact() {
		return new ContactsBuilder();
	}

	public ContactsBuilder withPhoto(ImageView photo) {
		this.contact.setPhoto(photo);
		return this;
	}

	public ContactsBuilder withID(long id) {
		this.contact.setId(id);
		return this;
	}

	public ContactsBuilder withName(String name) {
		this.contact.setName(name);
		return this;
	}

	public ContactsBuilder withMapsEmail(String mapsEmail) {
		this.contact.setMapsEmail(mapsEmail);
		return this;
	}

	public ContactsBuilder withFavourite(boolean favourite) {
		this.contact.setFavorite(favourite);
		return this;
	}

	public ContactsBuilder withExtensionLine(List<ExtensionLine> extensionLine) {
		this.contact.setExtensionLines(extensionLine);
		return this;
	}

	public Contact buildContact() {
		return this.contact;
	}

}
